<?php
/**
 * Created by PhpStorm.
 * User: Dinh Thi
 * Date: 2/25/15
 * Time: 2:36 PM
 */

namespace MyApp\Application\Model;


class StaticModel {
    static public function dateRange( $first, $last, $step = '+1 day', $format = 'd/m/Y' ) {

        $dates = array();
        $current = strtotime( $first );
        $last = strtotime( $last );

        while( $current <= $last ) {

            $dates[] = date( $format, $current );
            $current = strtotime( $step, $current );
        }

        return $dates;
    }
} 